package com.rockcent.wechat.helper;

import com.rockcent.mall.lib.dto.MallWechatMenuListDTO;
import me.chanjar.weixin.common.bean.menu.WxMenuButton;

/**
 * Created by zhangjh on 2016/12/5.
 */
public enum  MallWechatMenuConfigHelper {
    SINGLETON;

    public MallWechatMenuListDTO chgWxMenuToMenu(WxMenuButton subButton) {
        MallWechatMenuListDTO subMenu = new MallWechatMenuListDTO();
        subMenu.setName(subButton.getName());
        subMenu.setPageUrl(subButton.getUrl());
        subMenu.setMenuType(subButton.getType());
        return subMenu;
    }
}
